timediff=[3.961277,2.927701;3.765502,1.507485;2.824926,0.866331;1.013256,0.513222;1.405509,0.308685;1.716402,0.188907;1.695549,0.119510;1.646305,0.080287;1.550354,0.058438;1.442646,0.045917;1.545518,0.038246;1.493705,0.033187;1.432819,0.029633;1.509649,0.027015;1.513810,0.025014;1.477933,0.023442;1.456999,0.022180;1.473601,0.021151;1.472626,0.020301;1.440003,0.019590;1.503654,0.018992];
close all
fig= figure(1);
set(fig,'defaultAxesColorOrder',[[0 .5 0.5]; [0,0,0]]);

x = 1:size(timediff,1);
x =  x';
truevalue = 1.5*ones(size(x));
plot(x,timediff(:,1),'k');
hold on
yyaxis right
plot(x,timediff(:,2),'-d','Color',[0 .5 0.5]);
legend('Estimation of \Delta_{ij}','std estimation of \Delta_{ij}');

yyaxis left
plot(x,truevalue,'k--');
ylabel('Estimation(meter)');
axis([1,25,-0.1,4]);

yyaxis right
% plot(x,timediff(:,2),'r-');
xlabel('Iteration index');
ylabel('std(meter)');
axis([1,25,-0.1,0.5]);
title('Estimation of \Delta_{ij} in each iteration');

saveas(fig,'timediffcovergence.eps');